/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package modelo.dao;


import modelo.conexao.conexao;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.JOptionPane;


public class PesquisaDAO {

    public ResultSet rs;
    public Statement statement;

     public void pesquisaPreencherTabela(String p) {
        try {
         
            conexao bd = new conexao();
            bd.conectar();
            statement = bd.getConexao().createStatement();
            rs = statement.executeQuery(p);
            bd.desconectar();
        } catch (SQLException e) {
            JOptionPane.showMessageDialog(null, e);


        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }
     }       
    }

